﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ProjectManagement.Domain.Services;

namespace ProjectManagement.Web.HtmlHelp
{
	public static class PermissionListHelper
	{
		private static ControllerActionService _controllerActionSercice = new ControllerActionService();
		public static IEnumerable<string> DisplayPermissionHelper(this HtmlHelper htmlHelper,int id)
		{
			var second = _controllerActionSercice.QuerySecondByMainId(id);
			var secAll = new List<string>();
			foreach (var item in second)
			{
				secAll.Add(item.Name);
			}
			return secAll;
		}
	}
}